package com.glb.gilibuy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * user_order
 * @author 
 */
@ApiModel(value="com.glb.gilibuy.entity.UserOrder订单表")
@Data
public class UserOrder implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 订单id
     */
    @ApiModelProperty(value="订单id")
    private String orderId;

    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id")
    private String userId;

    /**
     * 总金额
     */
    @ApiModelProperty(value="总金额")
    private BigDecimal orderPrice;

    /**
     * 收件人姓名
     */
    @ApiModelProperty(value="收件人姓名")
    private String receiveName;

    /**
     * 收件人手机号
     */
    @ApiModelProperty(value="收件人手机号")
    private String receivePhone;

    /**
     * 省
     */
    @ApiModelProperty(value="省")
    private String receiveProvince;

    /**
     * 市
     */
    @ApiModelProperty(value="市")
    private String receiveCity;

    /**
     * 区
     */
    @ApiModelProperty(value="区")
    private String receiveRegion;

    /**
     * 详细地址
     */
    @ApiModelProperty(value="详细地址")
    private String receiveAddressDetail;

    /**
     * 支付方式：0->未支付；1->支付宝；2->微信
     */
    @ApiModelProperty(value="支付方式：0->未支付；1->支付宝；2->微信")
    private Integer paymentType;

    /**
     * 订单状态：0->待付款；1->已付款，待发货；2->发货完成，已出库，待收货；3->已确认收货，交易成功，待评价；4->已评价；-1->用户关闭；-2->超时关闭；-3->管理员关闭
     */
    @ApiModelProperty(value="订单状态：0->待付款；1->已付款，待发货；2->发货完成，已出库，待收货；3->已确认收货，交易成功，待评价；4->已评价；-1->用户关闭；-2->超时关闭；-3->管理员关闭")
    private Integer orderState;

    /**
     * 快递单号
     */
    @ApiModelProperty(value="快递单号")
    private String trackingNumber;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserOrder other = (UserOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getOrderPrice() == null ? other.getOrderPrice() == null : this.getOrderPrice().equals(other.getOrderPrice()))
            && (this.getReceiveName() == null ? other.getReceiveName() == null : this.getReceiveName().equals(other.getReceiveName()))
            && (this.getReceivePhone() == null ? other.getReceivePhone() == null : this.getReceivePhone().equals(other.getReceivePhone()))
            && (this.getReceiveProvince() == null ? other.getReceiveProvince() == null : this.getReceiveProvince().equals(other.getReceiveProvince()))
            && (this.getReceiveCity() == null ? other.getReceiveCity() == null : this.getReceiveCity().equals(other.getReceiveCity()))
            && (this.getReceiveRegion() == null ? other.getReceiveRegion() == null : this.getReceiveRegion().equals(other.getReceiveRegion()))
            && (this.getReceiveAddressDetail() == null ? other.getReceiveAddressDetail() == null : this.getReceiveAddressDetail().equals(other.getReceiveAddressDetail()))
            && (this.getPaymentType() == null ? other.getPaymentType() == null : this.getPaymentType().equals(other.getPaymentType()))
            && (this.getOrderState() == null ? other.getOrderState() == null : this.getOrderState().equals(other.getOrderState()))
            && (this.getTrackingNumber() == null ? other.getTrackingNumber() == null : this.getTrackingNumber().equals(other.getTrackingNumber()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getOrderPrice() == null) ? 0 : getOrderPrice().hashCode());
        result = prime * result + ((getReceiveName() == null) ? 0 : getReceiveName().hashCode());
        result = prime * result + ((getReceivePhone() == null) ? 0 : getReceivePhone().hashCode());
        result = prime * result + ((getReceiveProvince() == null) ? 0 : getReceiveProvince().hashCode());
        result = prime * result + ((getReceiveCity() == null) ? 0 : getReceiveCity().hashCode());
        result = prime * result + ((getReceiveRegion() == null) ? 0 : getReceiveRegion().hashCode());
        result = prime * result + ((getReceiveAddressDetail() == null) ? 0 : getReceiveAddressDetail().hashCode());
        result = prime * result + ((getPaymentType() == null) ? 0 : getPaymentType().hashCode());
        result = prime * result + ((getOrderState() == null) ? 0 : getOrderState().hashCode());
        result = prime * result + ((getTrackingNumber() == null) ? 0 : getTrackingNumber().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", userId=").append(userId);
        sb.append(", orderPrice=").append(orderPrice);
        sb.append(", receiveName=").append(receiveName);
        sb.append(", receivePhone=").append(receivePhone);
        sb.append(", receiveProvince=").append(receiveProvince);
        sb.append(", receiveCity=").append(receiveCity);
        sb.append(", receiveRegion=").append(receiveRegion);
        sb.append(", receiveAddressDetail=").append(receiveAddressDetail);
        sb.append(", paymentType=").append(paymentType);
        sb.append(", orderState=").append(orderState);
        sb.append(", trackingNumber=").append(trackingNumber);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}